package pers.zc.activiti.shejimoshi.celve;

/**
 * @Annotion:
 * @ClassName: Test
 * @Author: Lin Fuyuan
 * @Date: 2019/9/24  14:12
 * @Version: 1.0
 */
public class Test {
    /**
     *
     */
    public static void main(String[] args){
           /*新建环境实例*/
        StargeContext context = new StargeContext();
        StargeBoss boss = null;

        int x =2;
        switch(x){
            case 1 :boss = new Stargeimp1(); break;
            case 2 :boss = new Stargeimp2();break;
            case 3 :boss = new Stargeimpl3();break;
            default:boss = null; break;
        }
        if(boss!=null){
            context.setStargeBoss(boss);
            context.stargeTestMethod();
        }
//        StargeBoss boss1 = new Stargeimp1();
//        context.setStargeBoss(boss1);
//        context.stargeTestMethod();
//        System.out.println("-------------");
//        StargeBoss boss2 = new Stargeimp2();
//        context.setStargeBoss(boss2);
//        context.stargeTestMethod();
//        System.out.println("-------------");
//        StargeBoss boss3 = new Stargeimpl3();
//        context.setStargeBoss(boss3);
//        context.stargeTestMethod();

    }
}
